home *** CD-ROM | disk | FTP | other *** search
- Path: news.sinet.slb.com!usenet
- From: primaves@manchester.gm.slb.com (Nick Primavesi)
- Newsgroups: comp.lang.basic.visual.misc,comp.lang.c,comp.lang.c++
- Subject: Re: DLL, VB and Borland C/C++
- Date: Mon, 25 Mar 1996 09:52:01 GMT
- Organization: Schlumberger
- Message-ID: <4j5mqr$su7@ohnasn01.sinet.slb.com>
- References: <312A0334.AC5@supaero.fr> <4gfg6m$eet@hasle.sn.no> <4hagmf$qc0@donald.interpac.be>
- NNTP-Posting-Host: 134.32.42.14
- X-Newsreader: Forte Free Agent 1.0.82
-
- tlgnsmd@mail.interpac.be (Michel Lombart) wrote:
-
- >Sylvain Souche <souche@supaero.fr> wrote
-
- >>Hi,
-
- >>I am trying desperatly to call a DLL created with Borland C/C++ 4.5 in a
- >>VB 3.0 application, but VB always complains about a so called "Bad
- >>Calling Convention Error". This Error message is not very documented,
- >>and Borland Help files are worth nothing, so...
-
- > Hi Sylvain.
-
- >Did you use, if necessary, the "byval" option in your declaration
- >code?
-
- >Michel
-
- I have the same problem with VB4.0 and Visual C++ DLLs
-
- The ByVal option is required but this does not always cure the
- problem.
-
- VB uses the PASCAL calling convention so the DLL should be compiled
- using FAR PASCAL for 16 bit or __stdcall. This still did not cure my
- problem but it got me closer.
-
- I have just been infomed that my problem is due to the omission of the
- .DEF file by the VC++ compiler now so check that you also have the
- DEF file with the .DLL.
-
- Let me know if this helps and if you discover anything that may help
- me.
-
- Cheers,
-
- Jolyon.
-
-